{extend name="layout"}
{block name="content"}
<div class="col-sm-8 blog-main">
    <form class="form-horizontal" action="/user/{$id}/setting" method="POST" enctype="multipart/form-data">
        <input type="hidden" name="__token__" value="{$Request.token}">
        <div class="form-group">
            <label class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input class="form-control" name="name" type="text" value="{$user_info.nickname}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">头像</label>
            <div class="col-sm-10">
                <input class="file-loading preview_input" type="file" accept="image/png,image/jpeg,image/jpg,image/gif" value="头像" name="avatar">
                <img src="{$avatar_url? '/uploads/'.$avatar_url : ''}" alt="暂无设置头像" class="img-rounded" height="200px" width="200px" style="border-radius:500px;" id="prew-img">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default btn-info">修改</button>
            </div>
        </div>
    </form>
    <br>

</div>
{/block}

{block name="footerscript"}
    {js href='/static/js/frontend/user/setting.js'}
{/block}